#ifndef __ICONTAINER__
#define __ICONTAINER__

#define DataInvalidTime 10000
#define MAX_PRO_QUEUE_DEPTH 2048
#define MAX_TRD_QUEUE_DEPTH 2048 * 5

#include "IObject.h"

class IQueue : public virtual IObject, public virtual IProductInstance
{
public:
	virtual bool Push(IData * ptrData, int iQueueKey) = 0;
	virtual IData * Pop() = 0;
	virtual void QueueInfo(long long &llProductionNum, long long &llConsumptionNum) = 0;
	virtual bool EmptyQueue() = 0;
	virtual bool FlipQueueKey() = 0;
	virtual int QueueKey() = 0;
	virtual int QueueType() = 0;
};

class IProcessShrMem : public virtual IObject, public virtual IProductInstance
{
public:
	//virtual const long long ProcessID() const = 0;
	virtual const char * DataBuf() const = 0;
	virtual const bool Finish() = 0;
	virtual const char * SequenceNo() = 0;
	virtual const bool WriteShrMem(void * ptrPktInfo) = 0;
	virtual const bool WriteCurMem(void * ptrPktInfo) = 0;
	virtual const void SetDataBuf(const char * szDataBuf, const long long llSize, const int iPktSize, long long llProID) = 0;
    virtual const bool TOP_FLAG() = 0;
    virtual void SetTopFlag(bool bTopFlg) = 0;
};

class IQueueOperation : public virtual IObject
{
public: 
    virtual const bool IsQueueExist(const char * pszQueueName) = 0;
    virtual bool CreateQueue(const char * pszQueueName, int iQueueType = 1) = 0;
	virtual bool FreeQueue(const char * pszQueueName) = 0;
    virtual bool PushTask(const char * pszQueueName, const char * pszTask, int iQueueKey = -1) = 0;
    virtual bool PushTask(const char * pszQueueName, IData * ptrTask, int iQueueKey = -1) = 0;
    virtual IData * PopTask(const char * pszQueueName) = 0;
	virtual int QueueKey(const char * pszQueueName) = 0;
    virtual bool EmptyQueue(const char * pszQueueName) = 0;
	virtual bool FlipQueueKey(const char * pszQueueName) = 0;
};

#endif//__ICONTAINER_MANAGER__
